const base = require('./base');
const {get} = require('lodash')

module.exports = class Login extends base {
    constructor() {
        super();
    }

    async login(token) {
        const resp = await this.api.get(`/callback/cli/token?token=${token}`)
        return get(resp, 'accessToken', '');
    }
}
